
/**
    支付页面
* */
<template>
    <div>
        <div>您的订单号已生成，订单号是：{{this.$route.query.orderNo }}</div>
        <div>订单金额：3999.00</div>
        <div>请选择支付平台：
            <el-radio v-model="radio" label="1">微微支付</el-radio>
            <el-radio v-model="radio" label="2">支付宝支付</el-radio>
        </div>
        <div><el-button type="success" @click="eventPay">立即付款</el-button></div>
        <div style="display:none;width:1px;height:1px;">
            <div v-html="body"></div>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            radio:1,
            body:'',            
        }
    },
    methods: {
        eventPay() {
            let url =this.$baseUrl + '/order/alipay'
            this.$http.get(url,{
                params:{
                    orderNo:this.$route.query.orderNo
                }
            }).then(res=>{
                console.log(res)
                if(res.data.code == 200){
                    this.body = res.data.data
                    this.$nextTick(()=>{
                        document.forms[0].submit()
                    })                    
                }
            })
        }
    }
}
</script>